﻿
using OpenCvSharp;

using Xc.DataAccess.CodeReader.Properties;
using Xc.DataAccess.Core;

namespace Xc.DataAccess.CodeReader.Models.Filters
{
    /// <summary>
    /// 放大
    /// </summary>
    [Filter("放大",FilterType.Algorithm)]
    public class AlgorithmPyrUp:FilterBase
    {
        [InputParameter("目标大小")]
        public CVSize DstSize { get; set; } = new CVSize();
        /// <summary>
        /// 边界类型
        /// </summary>
        [InputParameter("边界类型")]
        public BorderTypes BorderTypes { get; set; } = BorderTypes.Default;
        internal override ResultData<Mat> UseChannel(Mat mat, FilterBase[] filterInfos, FilterBase preFilterBase)
        {
            Cv2.PyrUp(mat,mat, DstSize, BorderTypes);
            return ResultData<Mat>.Accept(TextResource.filter_action_complete, mat);
        }
    }

}
